package com;


import com.inter.OnShakeListener;

public class SubstringMain {


    public static void main(String[] args) {
//        String value = "eth1: ip 192.168.1.10 mask 0.0.0.0 flags";
//        value = value.substring(value.indexOf("ip")+2,value.indexOf("mask")).trim();
//
//        System.out.println(value);

        com.mcl.printer.widgets.SkakeFilter skakeFilter = new com.mcl.printer.widgets.SkakeFilter(3, new OnShakeListener() {
            @Override
            public void onShake() {
                System.out.println("shake");
            }

            @Override
            public void onRecover() {
                System.out.println("recover");
            }
        });
        for (int i = 0; i < 100; i++) {
            if (i == 0) {
                skakeFilter.shake(false);
            } else if (i > 50 && i < 59) {
                skakeFilter.shake(true);
            } else {
                skakeFilter.shake(false);
            }

        }
    }
}
